package com.jemmyee.pizza.service;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.IEquiDao;
import com.jemmyee.pizza.entity.Equi;

@Repository("equiService")
public class EquiServiceImpl implements IEquiService<Equi>{

	private static final Log log = LogFactory.getLog(EquiServiceImpl.class);
	
	@Autowired
	private IEquiDao equiDao ;
	
	
	public void delete(Equi entity) {
		equiDao.delete(entity);
	}

	public void deleteAll(List<Equi> list) {
		equiDao.deleteAll(list);
	}

	public void deleteById(Serializable id) {
		equiDao.deleteById(id);
	}

	public List<Equi> findAll() {
		return equiDao.findAll(new Equi());
	}

	public List<Equi> findByCriteria(DetachedCriteria criteria) {
		return equiDao.findByCriteria(criteria);
	}

	public Equi findById(Serializable id) {
		return equiDao.findById(id);
	}

	public List<Equi> findByProperty(String propertyName, Object value) {
		return equiDao.findByProperty(new Equi(), propertyName, value);
	}

	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex,String order) {
		return equiDao.findPageByCriteria(detachedCriteria, pageSize, startIndex, order);
	}

	public void save(Equi entity) {
		equiDao.save(entity) ;
	}

	public void update(Equi entity) {
		equiDao.update(entity);
	}

}
